import http from '@src/util/http'

const prefix = '/api/application'

// 获取应用列表
export function getAppList(params) {
  return http.get(`${prefix}/outside/trigger/v3/getAppList`, params);
}

// 获取api接口列表
export function getApiList(params) {
    return http.get(`${prefix}/outside/trigger/v3/getApiList`, params);
}

// 获取条件配置字段信息
export function getConditionConfig(params) {
    return http.post(`${prefix}/outside/trigger/v3/getConditionConfig`, params);
}

// 获取字段映射配置信息
export function getFieldMapping(params) {
    return http.post(`${prefix}/outside/trigger/v3/getFieldMapping`, params);
}

// 获取触发方式配置列表
export function getExecuteWayConfigList(params){
    return http.get(`${prefix}/outside/trigger/v3/getExecuteWayConfigList`, params);
}

// 获取触发方式列表
export function getAllExecuteWayList(params){
    return http.get(`${prefix}/outside/trigger/v3/getAllExecuteWayList`, params);
}

// 获取触发器详情
export function getTriggerInfo(params) {
    return http.get(`${prefix}/outside/trigger/v3/getDetail`, params);
}

// 获取超时提醒的时间类型的字段
export function getTimeOutFormTimeField(params) {
    return http.get(`${prefix}/outside/trigger/v3/getTimeOutFormTimeField`, params);
}

// 创建触发器新版v2
export function createTrigger(params) {
    return http.post(`${prefix}/outside/trigger/v3/create`, params);
}

// 编辑触发器新版
export function editTrigger(params) {
    return http.post(`${prefix}/outside/trigger/v3/update`, params);
}

// 获取固定值列表
export function getFixedValueList(params) {
    return http.post(`${prefix}/outside/trigger/v3/getFixedValueList`, params);
}